package com.sqtracker.recommender.model;

import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
import java.util.Date;

@Document(collection = "torrent_scores")
public class TorrentScore {
    @Id
    private String id;
    private String torrentId;
    
    // 技术维度 (30%)
    private double downloadSuccessRate; // 下载成功率
    private int seedersCount;          // 做种节点数
    private double technicalScore;     // 技术维度总分
    
    // 内容维度 (50%)
    private double userRatingAverage;  // 用户评分平均值
    private int userRatingCount;       // 用户评分数量
    private double contentScore;       // 内容维度总分
    
    // 社区维度 (20%)
    private double averageResponseTime;    // 平均响应时间(小时)
    private double longTermValue;          // 长期价值系数
    private double communityScore;         // 社区维度总分
    
    // 最终评分
    private double finalScore;             // 最终评分（包含贝叶斯平均修正）
    
    private Date lastUpdated;              // 最后更新时间
    private Date createdAt;                // 创建时间

    // Getters and Setters
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getTorrentId() {
        return torrentId;
    }

    public void setTorrentId(String torrentId) {
        this.torrentId = torrentId;
    }

    public double getDownloadSuccessRate() {
        return downloadSuccessRate;
    }

    public void setDownloadSuccessRate(double downloadSuccessRate) {
        this.downloadSuccessRate = downloadSuccessRate;
    }

    public int getSeedersCount() {
        return seedersCount;
    }

    public void setSeedersCount(int seedersCount) {
        this.seedersCount = seedersCount;
    }

    public double getTechnicalScore() {
        return technicalScore;
    }

    public void setTechnicalScore(double technicalScore) {
        this.technicalScore = technicalScore;
    }

    public double getUserRatingAverage() {
        return userRatingAverage;
    }

    public void setUserRatingAverage(double userRatingAverage) {
        this.userRatingAverage = userRatingAverage;
    }

    public int getUserRatingCount() {
        return userRatingCount;
    }

    public void setUserRatingCount(int userRatingCount) {
        this.userRatingCount = userRatingCount;
    }

    public double getContentScore() {
        return contentScore;
    }

    public void setContentScore(double contentScore) {
        this.contentScore = contentScore;
    }

    public double getAverageResponseTime() {
        return averageResponseTime;
    }

    public void setAverageResponseTime(double averageResponseTime) {
        this.averageResponseTime = averageResponseTime;
    }

    public double getLongTermValue() {
        return longTermValue;
    }

    public void setLongTermValue(double longTermValue) {
        this.longTermValue = longTermValue;
    }

    public double getCommunityScore() {
        return communityScore;
    }

    public void setCommunityScore(double communityScore) {
        this.communityScore = communityScore;
    }

    public double getFinalScore() {
        return finalScore;
    }

    public void setFinalScore(double finalScore) {
        this.finalScore = finalScore;
    }

    public Date getLastUpdated() {
        return lastUpdated;
    }

    public void setLastUpdated(Date lastUpdated) {
        this.lastUpdated = lastUpdated;
    }

    public Date getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(Date createdAt) {
        this.createdAt = createdAt;
    }
} 